package com.mvc.base.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

import com.mvc.framework.model.CompositeKeyAuditableEntity;

@Entity(name = "B_USER_NOTICE")
@IdClass(UserNoticePK.class)
public class UserNotice extends CompositeKeyAuditableEntity {
	public static final int	TYPE_ORDER_APPROVAL	     = 1;
	public static final int	TYPE_PURCHASE_APPROVAL	 = 10;
	public static final int	TYPE_EXPENSE_APPROVAL	 = 20;
	public static final int	TYPE_QUOTATION_APPROVAL	 = 30;
	public static final int	TYPE_COMMERCIAL_APPROVAL	= 40;

	@Id
	private Integer	        userId;
	@Id
	private Integer	        type;

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
}

class UserNoticePK implements Serializable {
	private Integer	userId;
	private Integer	type;

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
}